package com.rois.librois.RoIS;


/**
* RoIS/ErrorTypeHelper.java .
* IDL-to-Java コンパイラ (ポータブル), バージョン "3.1" で生成
* 生成元: RoIS_IDL.idl
* 2011年9月8日 0時05分17秒 JST
*/


/* Completed_Status */
abstract public class ErrorTypeHelper
{
  private static String  _id = "IDL:RoIS/ErrorType:1.0";

  public static void insert (org.omg.CORBA.Any a, com.rois.librois.RoIS.ErrorType that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static com.rois.librois.RoIS.ErrorType extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (com.rois.librois.RoIS.ErrorTypeHelper.id (), "ErrorType", new String[] { "ENGINE_INTERNAL_ERROR", "COMPONENT_INTERNAL_ERROR", "COMPONENT_NOT_RESPONDING", "USER_DEFINED_ERROR"} );
    }
    return __typeCode;
  }

  public static String id ()
  {
    return _id;
  }

  public static com.rois.librois.RoIS.ErrorType read (org.omg.CORBA.portable.InputStream istream)
  {
    return com.rois.librois.RoIS.ErrorType.from_int (istream.read_long ());
  }

  public static void write (org.omg.CORBA.portable.OutputStream ostream, com.rois.librois.RoIS.ErrorType value)
  {
    ostream.write_long (value.value ());
  }

}
